import mixin from '@/mixin/mixin.js'
import $parent from '@/libs/$parent.js'
import addUnit from '@/libs/addUnit.js'
import guid from '@/libs/guid.js'
import test from '@/libs/test.js'
import {
	sys,
	os
} from '@/libs/sys.js'
let version = '1.0.0';
const config = {
	v: version,
	version: version,
	// 主题名称
	type: [
		'primary',
		'success',
		'info',
		'error',
		'warning'
	]
}
const zIndex = {
	navbar: 980,
}
const $u = {
	sys,
	os,
	test,
	$parent,
	addUnit,
	config, // uView配置信息相关，比如版本号
	zIndex,
	guid,
}

// $u挂载到uni对象上
uni.$u = $u

const install = Vue => {
	Vue.mixin(mixin)
	Vue.prototype.$u = $u
}

export default {
	install
}